<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../vue.js"></script>
</head>

<body>
  <div id="app">
    <div>
      <button @click="flag = 1">电影</button>
      <button @click="flag = 2">音乐</button>
      <button @click="flag = 3">小说</button>
    </div>

    <div>
      <ul v-show="flag===1">
        <li>桃花侠</li>
        <li>菊花怪</li>
      </ul>
      <ul v-show="flag===2">
        <li>最伟大的作品</li>
        <li>夜曲</li>
      </ul>
      <ul v-show="flag===3">
        <li>斗破苍穹</li>
        <li>斗罗大陆</li>
      </ul>
    </div>
  </div>
  <script>
    Vue.config.productionTip = false;

    const vm = new Vue({
      el: "#app",
      data() {
        return {
          flag: 1
        }
      }
    })
  </script>
</body>

</html>